/*
* @to-body.vue
* @deprecated
* @author czh
* @update (czh 2021/9/30)
*/
<template>
<div>
    <slot></slot>
</div>
</template>

<script lang="ts">
import {defineComponent} from "@vue/composition-api";
export default defineComponent({
    name: "BeToBody",
    data() {
        return {}
    },
    mounted() {
        this.$nextTick(() => {
            const body:HTMLElement | null = document.querySelector("body");
            if(!body) return
            if (body.append) {
                body.append(this.$el);
            } else {
                body.appendChild(this.$el);
            }
            this.$emit('renders')
        });
    },
    methods: {},
})
</script>

<style scoped>

</style>